<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/17 0017
 * Time: 09:01
 */
namespace app\api\model;

use think\Model;

class Usersreal extends Model
{
    protected $dateFormat = 'Y年m月d日 H:i:s';
    protected $type = [
        'add_time'    =>  'timestamp',
        'transit_time'    =>  'timestamp',
    ];
    public function users()
    {
        return $this->belongsTo('users','user_id','user_id');
    }
    public function getStatusAttr($value)
    {
        $sex = [0=>'未选择',1=>'男',2=>'女'];
        return $sex[$value];
    }
}